<!-- include tpl=head_lay -->
<script type="text/javascript" src="{func add_js user.js}"></script>
<div class="layui-card" id="search_html">
	<div class="layui-card-body">
		<form method="post" action="{url ctrl=user/}" class="layui-form">
		<div class="layui-row layui-col-space5">
			<div class="layui-col-xs12 layui-col-sm4 layui-col-md2">
		    	<select name="psize">
					<option value="20">{lang每页数量}</option>
					<option value="30"{if $psize == 30} selected{/if}>30</option>
					<option value="50"{if $psize == 50} selected{/if}>50</option>
					<option value="70"{if $psize == 70} selected{/if}>70</option>
					<option value="80"{if $psize == 80} selected{/if}>80</option>
					<option value="90"{if $psize == 90} selected{/if}>90</option>
					<option value="100"{if $psize == 100} selected{/if}>100</option>
				</select>
			</div>
			<div class="layui-col-xs12 layui-col-sm4 layui-col-md2">
				<select name="group_id">
					<option value="">{lang用户组}</option>
					<!-- loop from=$grouplist key=$key value=$value id=$tmpid -->
					<option value="{$value.id}"{if $group_id == $value.id} selected{/if}>{$value.title}</option>
					<!-- /loop -->
				</select>
			</div>
			<div class="layui-col-xs12 layui-col-sm4 layui-col-md2">
				<select name="keywords[status]">
					<option value="">{lang状态}</option>
					<option value="1"{if $keywords.status == 1} selected{/if}>{lang正常}</option>
					<option value="4"{if $keywords.status == 4} selected{/if}>{lang未审核}</option>
					<option value="2"{if $keywords.status == 2} selected{/if}>{lang锁定}</option>
					<option value="3"{if $keywords.status == 3} selected{/if}>{lang禁言}</option>
				</select>
			</div>
			<div class="layui-col-xs12 layui-col-sm4 layui-col-md2">
				<select id="key_type" name="key_type">
					<!-- loop from=$flist key=$key value=$value id=$tmpid -->
					<option value="{$key}"{if $key_type == $key} selected{/if}>{$value}</option>
					<!-- /loop -->
				</select>
			</div>
			<div class="layui-col-xs12 layui-col-sm4 layui-col-md2">
				<input type="text" id="key_data" name="key_data" class="layui-input" value="{$key_data}" />
			</div>
			<div class="layui-col-xs12 layui-col-sm4 layui-col-md2">
				<div class="layui-btn-group">
					<input type="submit" value="{lang搜索}" class="layui-btn" />
					<a href="{url ctrl=user/}" class="layui-btn layui-btn-warm">{lang全部会员}</a>
				</div>
			</div>
		</div>
		</form>
	</div>
</div>
<div class="layui-card">
	<div class="layui-card-header">
		{lang列表}
		<div class="fr"><div class="action"></div></div>	
		<div class="layui-btn-group fr" id="user_card_top">
			<button class="layui-btn layui-btn-sm" onclick="$.win('{lang添加用户}','{url ctrl=user func=set/}')">
				<i class="layui-icon">&#xe654;</i>
				{lang添加用户}
			</button>
			<!-- if $session.admin_rs.if_system -->
			<button class="layui-btn layui-btn-sm" onclick="$.admin_user.show_setting()">
				<i class="layui-icon">&#xe620;</i>
				{lang显示字段设置}
			</button>
			<!-- /if -->
		</div>
	</div>
	<div class="layui-card-body">
		<div id="phpok-userlist">
		<table width="100%" class="layui-table" id="tablelist" lay-filter="tablelist" data-psize="{$psize}" data-total="{$total}" data-totalRow="false" lay-data="{escape: false}">
		<thead>
		<tr>
			<th lay-data="{field:'_id', width:60,fixed:'left',unresize:true}">ID</th>
			<th lay-data="{field:'status', width:50,fixed:'left',unresize:true}">&nbsp;</th>
			<th lay-data="{field:'title',width:60,unresize:true}"></th>
			<!-- loop from=$arealist key=$key value=$value id=$tmpid -->
				
				<!-- if $key == 'regtime' -->
				<th lay-data="{field:'regtime', width:150,unresize:true}">{lang注册时间}</th>
				<!-- elseif $key == '_action' -->
				<th lay-data="{field:'_action', width:150,fixed:'right',unresize:true}">{lang操作}</th>
				<!-- else -->
				<th lay-data="{field:'{$key}', align:'left'}">{func P_Lang $value}</th>
				<!-- /if -->
			<!-- /loop -->
			
		</tr>
		</thead>
		<!-- loop from=$rslist key=$key value=$value id=$tmpid -->
		<tr>
			<td align="center">{$value.id}</td>
			<td><span id="status_{$value.id}" onclick="$.admin_user.status({$value.id},this)" class="status{$value.status}" value="{$value.status}"></span></td>
			<td align="center"><img src="{$value.avatar ? $value.avatar : 'images/user_default.png'}" border="0" width="24px" height="24px" /></td>
			<!-- loop from=$arealist key=$k value=$v -->
			<!-- if $k == 'regtime' -->
			<td>{func date 'Y-m-d H:i' $value.regtime}</td>
			<!-- elseif $k == '_action' -->
			<td>
				<div class="layui-btn-group">
					<input type="button" value="{lang查看}" onclick="$.win('{lang查看用户}_#{$value.id}','{url ctrl=user func=show id=$value.id/}')" class="layui-btn layui-btn-xs" />
					<input type="button" value="{lang编辑}" onclick="$.win('{lang编辑用户}_#{$value.id}','{url ctrl=user func=set id=$value.id/}')" class="layui-btn layui-btn-xs" />
					<!-- if $popedom.delete -->
					<input type="button" value="{lang删除}" onclick="del({$value.id},'{$value.user}')" class="layui-btn layui-btn-xs layui-btn-danger" />
					<!-- /if -->
				</div>
			</td>
			<!-- else -->
			<td>
				<!-- if is_array($value[$k]) -->
					<!-- if $value[$k]['_admin']['type'] == 'pic' -->
					<img src='{$value[$k]["_admin"]["info"]}' border="0" width="28px" height="28px" />
					<!-- elseif $value[$k]['_admin'] -->
					{$value[$k]['_admin']['info']}
					<!-- elseif $k == 'wealth' -->
						<!-- loop from=$wlist key=$k value=$v id=$idxx -->
						<div>{$v.title}：{$value.wealth[$k] ? $value.wealth[$k] : 0} {$v.unit}</div>
						<!-- /loop -->
					<!-- else -->
					{$value[$k]['user']}
					<!-- /if -->
				<!-- else -->
					<!-- if $k == 'order' -->
					<a href="javascript:$.win('{lang用户订单}_{$value.user}','{url ctrl=order keywords=$value.user keytype=user/}');void(0)">{$value[$k]}</a>
					<!-- elseif $k == 'group_id' -->
					{$grouplist[$value[$k]][title]}
					<!-- else -->
					{$value[$k]}
					<!-- /if -->
				<!-- /if -->
			</td>
			<!-- /if -->
			<!-- /loop -->
		</tr>
		<!-- /loop -->
		</table>
		</div>
		<!-- if $pagelist --><div class="center"><!-- include tpl=pagelist --></div><!-- /if -->
	</div>
</div>
<!-- include tpl=foot_lay -->